package algorithm.leetcode.q136;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

class Solution {
    public static int singleNumber(int[] nums) {
        int single = 0;
        for (int num : nums) {
            single = single^num;
        }
        return single;

    }


    public static void main(String[] args) {

        //System.out.println(singleNumber(new int[]{4,1,2,1,2}));
        List<Integer> list = new ArrayList<>();

        list.add(1);
        list.add(2);
        list.add(3);
        list.add(4);

        /*for (Integer integer : list) {
            System.out.println(integer);
        }*/

        //list.forEach(System.out::println);
        String b = new String("123");

        String a = new String("123");
        System.out.println(a.hashCode());

        Integer i =-10000;
        int m=1;
        Integer j =-10000;
        System.out.println(i==j);

        //System.out.println(a==b);
        //System.out.println(a.equals(b));
        //System.out.println(b.hashCode());
        Map<String,String> map = new HashMap<>();
        map.put("001",a);
        map.put("000",b);
    }
}